import React, { Component } from 'react';
import Courselist from './Courselist'
import { CourseBox } from './StyleCourse'
import NavHead from '../components/NavHead'
import { get } from '@u/http'


class Courseware extends Component {
    state={
        list:[]
    }
    async componentDidMount(){
        let result = await get({
            url:'/api/keJian/list/?uId=1'
        })
        // console.log(result.data);

        this.setState({
            list:result.data.keJians
        })

    }

    render() {
        return (
            <CourseBox>
                <NavHead title={'我的课件'}></NavHead>
                <Courselist list={this.state.list} ></Courselist>
            </CourseBox>
        );
    }
}

export default Courseware;